package com.starling.extend.display
{
	import com.starling.extend.components.BTextInput;
	
	import starling.display.Sprite;
	
	public class BSprite extends Sprite
	{
		/** 纹理链接名 */
		public var textureName:String;
		
		public function BSprite()
		{
			super();
		}
		
		
		private var _data:Object;
		public function get data():Object {return _data;}
		public function set data(value:Object):void {_data = value;}
		
		public function getBImage(name:String):BImage
		{
			return getChildByName(name) as BImage;
		}
		
		public function getBMovieClip(name:String):BMovieClip
		{
			return getChildByName(name) as BMovieClip;
		}
		
		public function getBScale9Image(name:String):BScale9Image
		{
			return getChildByName(name) as BScale9Image;
		}
		
		public function getBSprite(name:String):BSprite
		{
			return getChildByName(name) as BSprite;
		}
		
		public function getBTextField(name:String):BTextField
		{
			return getChildByName(name) as BTextField;
		}
		
		public function getBTextInput(name:String):BTextInput
		{
			return getChildByName(name) as BTextInput;
		}
		
		public function getBButton(name:String):BButton
		{
			return getChildByName(name) as BButton;
		}
	}
}